<template>
 <div></div>
</template>

<script>

  export default {
    name: "pagescroll",
    props:['reachbottom'],
    data() {
      return {

      }
    },
    created(){
      let that = this;
      this.$nextTick(()=>{
        $(window).scroll(function() {
        if($(document).scrollTop() == $(document).height() - $(window).height()) {
          console.log('到底部了')
          that.toBottom()
        }
      });
      })


    },
    methods: {
      toBottom(){
        this.$emit('reachbottom')
      }

    }
  }
</script>

<style lang="scss" scoped>
  .csup{
    opacity:.9;

    top:0;
    left:0;
    text-align:center;
    position:absolute;
    width:100%;
    height:100%;
    .upicon{

      color:red;
      width:120px;
      height: 60px;
      position: absolute;
      left:50%;
      top:50%;
      margin-left:-60px;
      margin-top:-60px;

      img{
        width:60px;

      }
      .utext{
        position: absolute;
        width:100%;
        text-align: center;
        color:#08F;
      }
    }

  }
  .csup:active{
    opacity: 1;}
</style>
